[
    async function( kuo,Context,context){
       
        this.$features = await Kuoplus("cms");
        let HCTime = Mode("Tools").Int(this.$features.configure['缓存时间']['0']);
        let HASH ="html/"+Md5(kuo.class+kuo.func_+implode('_',kuo.Path));
        Context.Cache = true;
        if(HCTime  > 0){
            let neirong = await Mem.Get(HASH);
            if(neirong){
                Context.body = neirong
                return ;
            }
        }
        await this.Wangzhan();
        let CANSHU = {
            WZ_title:this.$WANGZHAN['name'],
            WZ_description:this.$WANGZHAN['describes'],
            WZ_keywords:this.$WANGZHAN['keywords'],
            CLASS:kuo.class,
            $DATA :{},
            $ZDATA :{},
            PATH :kuo.Path,
            PAGE:0,
            FUNCION_:kuo.func_
        };
        let URL = kuo.func_;
        let $db = await db("cms_type");
        let $lexing = "type";
        let $DATA = await $db.Where( {'url':URL}).Find();
        if(!$DATA){
            $db = await $db.SetTable("cms_content");
            $DATA = await $db.Where( {'url':URL}).Find();
            $lexing = "content";
        }
        if(!$DATA){
            await this.Err404( kuo,Context,URL+"不存在");
            return ;
        }
        if($DATA['off'] != 2){
            await this.Err404( kuo,Context,URL+"关闭");
            return ;
        }
        $DATA['href'] = KuoLink([ kuo.class, $DATA['url'] ]);
        let $ZDATA = [];
        if($DATA['subclass'] != '0'){
            $db = await $db.SetTable("cms_type");
            $ZDATA = await  $db.Where( {'id':$DATA['subclass']}).Find();
            if(!$ZDATA){
                $ZDATA = [];
            }else{
                $ZDATA['href'] = KuoLink([ kuo.class, $ZDATA['url'] ]);
            }
        }
        let $MOBAN = "list";
        if($lexing == "type"){

            if($DATA['templatetype']  == 1){
            
                if($DATA['listtemplate'] != ""){
                    $MOBAN = $DATA['listtemplate'];
                }else if(  isset($ZDATA['listtemplate']) &&  $ZDATA['listtemplate'] != "") {
                    $MOBAN = $ZDATA['listtemplate'];
                }else{
                    $MOBAN ="list";
                }
            }else{
                if($DATA['contenttemplate'] != ""){
                    $MOBAN = $DATA['contenttemplate'];
                }else if(  isset($ZDATA['contenttemplate']) &&  $ZDATA['contenttemplate'] != "") {
                    $MOBAN = $ZDATA['contenttemplate'];
                }else{
                    $MOBAN ="neirong";
                }
            }

        }else{

            if($DATA['contenttemplate'] != ""){
                $MOBAN = $DATA['contenttemplate'];
            }else if(  isset($ZDATA['contenttemplate']) &&  $ZDATA['contenttemplate'] != "") {
                $MOBAN = $ZDATA['contenttemplate'];
            }else{
                $MOBAN ="neirong";
            }
        }
        if($DATA['describes'] != ""){
            CANSHU.WZ_description = $DATA['describes'] ;
        }
        if($DATA['keywords'] != ""){
            CANSHU.WZ_keywords = $DATA['keywords'] ;
        }
        if(kuo.Path && kuo.Path['0']){
            CANSHU.PAGE = Mode("Tools").Int(kuo.Path['0']);
        }
        let PAGE = "";
        if(CANSHU.PAGE > 1){
            PAGE = "第"+CANSHU.PAGE+"页_";
        }

        if($ZDATA && $ZDATA['name']){
            CANSHU.WZ_title = $DATA['name']+"_"+PAGE+$ZDATA['name']+"_"+  this.$WANGZHAN['name'];
        }else{
            CANSHU.WZ_title = $DATA['name']+"_"+PAGE+ this.$WANGZHAN['name'];
        }
        CANSHU.$DATA = $DATA;
        CANSHU.$ZDATA = $ZDATA;
        Context.body = await Mode("TPL").Render("@"+kuo.class+"/"+TPLtemp+"/"+$MOBAN ,CANSHU,this);
        if(HCTime  > 0 && Context.Cache){
            await Mem.Set(HASH,Context.body,HCTime);
        }
    }

]